﻿using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;

namespace Stauffware.Common.Core
{
	/// <summary>
	/// Generic parse options that should be supported by all parsers.
	/// The names and values of the options should be compatible.
	/// </summary>
	/// <remarks>
	/// Example of "derived" parse options:
	/// 
	/// enum MyParseOptions
	/// {
	///		None = 0,
	///		
	///		AllowLeadingWhite	= ParseOptions.AllowLeadingWhite,
	///		AllowTrailingWhite	= ParseOptions.AllowTrailingWhite,
	///		AllowInnerWhite		= ParseOptions.AllowInnerWhite,
	///		AllowWhiteSpace		= ParseOptions.AllowWhiteSpace,
	///		ParseEntireInput	= ParseOptions.ParseEntireInput,
	///		
	///		MyOption = 0x00
	/// }
	/// </remarks>

	[Flags]
	public enum ParseOptions
	{
		/// <summary>
		/// No parse options specified.
		/// </summary>
		None = 0,

		/// <summary>
		/// Allow leading whitespace.
		/// </summary>
		AllowLeadingWhite	= 0x01,

		/// <summary>
		/// Allow inner whitespace.  It is up to the type-specific Parse classes
		/// to interpret what this means.
		/// </summary>
		AllowInnerWhite		= 0x02,

		/// <summary>
		/// Allow trailing whitespace.
		/// </summary>
		AllowTrailingWhite	= 0x04,

		/// <summary>
		/// A combination of AllowLeadingWhite, AllowInnerWhite and AllowTrailingWhite.
		/// </summary>
		AllowWhiteSpace = AllowLeadingWhite | AllowTrailingWhite | AllowInnerWhite,

		/// <summary>
		/// Indicates that the entire input should be parsed; that is, nothing
		/// else may follow the parsed item (except whitespace, if allowed).
		/// </summary>
		ParseEntireInput = 0x08,

	}

}
